package com.java1412.controller;

import com.java1412.entity.User;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author java1412
 * @create 2021-05-14 10:21
 */
@Controller
public class NegotiationController {

    @ResponseBody
    @GetMapping(value = "/show")
    public User showUser() {
        User user = new User();
        user.setName("java1412");
        user.setSex("男");
        user.setDesc("java1412讲解内容协商机制了...");
        return user;
    }

    @ResponseBody
    @GetMapping(value = "/showMsg", produces = MediaType.APPLICATION_JSON_VALUE)
    public User showMsg() {
        User user = new User();
        user.setName("java1412");
        user.setSex("女");
        user.setDesc("java1412讲解内容协商机制了...showMsg");
        return user;
    }
}
